Apple's base media handler component provides a utility function, MediaSetHandlerCapabilities , which allows you to tell the base handler what your derived handler can do.
The MediaSetHandlerCapabilities function allows your derived media handler to report its capabilities to the base media handler.
pascal ComponentResult MediaSetHandlerCapabilities
(MediaHandler mh,
long flags,
long flagsMask);
Use the MediaSetHandlerCapabilities function to tell the base media handler what your derived media handler can do. By default, all of the flags are set to 0--in this case, your media handler is only responsible for storing and retrieving data. You can specify further capabilities by setting various flags to 1. For example, if your handler draws data on the screen, be sure to set the handlerHasSpatial flag to 1. Other flags govern more detailed aspects of handler operation.
This function uses both a flags parameter and a flagsMask parameter. You specify which flags are to be changed in a given operation by setting the flagsMask parameter. You then specify the new values for those affected flags with the flags parameter. In this manner, you can work with a single flag without affecting the settings of any other flags.
Your media handler may call this function at any time. In general, you should call it from your MediaInitialize function (described on MediaInitialize ), so that you report your capabilities to the base media handler before the Movie Toolbox starts working with your media. You may call this function again later, in response to changing conditions. For example, if your media handler receives a matrix that it cannot accommodate from the MediaSetMatrix function, you can allow the base media handler to handle your drawing by calling this function and setting the handlerNeedsBuffer flag in both the flags and flagsMask parameters to 1.
Note that this function is provided by the base media handler--your media handler does not support this function.